/*
 * buttons.h
 *
 *  Created on: Nov 12, 2013
 *      Author: Ahmed
 */

#ifndef BUTTONS_H_
#define BUTTONS_H_

void Buttons_Config(void);
void EnableButton_IRQ(uint8_t);
void DisableButton_IRQ(uint8_t);
void configure_EXTI(uint32_t,EXTITrigger_TypeDef);

#define BT_UP			0	// HW status
#define BT0_DOWN		1
#define BT1_DOWN		2
#define BT2_DOWN		3
#define BT3_DOWN		4
#define BT_DONE			5	// action behind pressing the button processed.

#define BT_SHORT_PRESS	5
#define BT_LONG_PRESS	6

//#define	BT_0			0
//#define	BT_1			1
//#define	BT_2			2
//#define	BT_3			3

#define BT_SHORT_PRESS_DURATION	10		// Thresholds in multiple of 100ms to decide on short and
#define BT_LONG_PRESS_DURATION	20		// long button press action


#endif /* BUTTONS_H_ */
